<%--
  Created by IntelliJ IDEA.
  User: Distance
  Date: 2021/10/19
  Time: 14:22
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
11
<c:if test="${12==12}">
  <p>111</p>
</c:if>
<c:if test="${12==12}">
    1111
</c:if><br><br>

<%--*      <c:choose><br>--%>
<%--    *          <c:when></c:when><br>--%>
<%--    *          <c:otherwise></c:otherwise><br>--%>
<%--    *      </c:choose><br>--%>
<%--*     作用：类似switch--%>
<%
           request.setAttribute("111","0");
%><br>
<c:choose>
    <c:when test="${ requestScope['111'] =='3333'}">
    2<br>
    </c:when>
    <c:when test="${ requestScope['111'] =='1111'}">
        333<br>
    </c:when>
    <c:otherwise>
        1111<br>
    </c:otherwise>
</c:choose>
</body>
</html>
